<script language="javascript" type="text/javascript" src="../../public/jquery.min.js"></script>
<section style="width: 100%">
  <form >
    <fieldset>
      <legend>姓名维度模板页面 匹配到(<%= alldata.length %>)条数据 </legend>
      <div>
        <%= JSON.stringify(alldata[0])%>
      </div>
    </fieldset>
  </form>
</section>
<section>
  <form >
    <fieldset>
      <legend>子库标签</legend>
      <div>

        <span>嫌疑人库(<%= JSON.parse(JSON.stringify(alldata[0]))["xm-xxr-XM"].length %>)</span>
        <span>报案人库(<%= JSON.parse(JSON.stringify(alldata[0]))["xm-bjr-XM"].length %>)</span>
        <span>看守所在押人员(<%= JSON.parse(JSON.stringify(alldata[0]))["xm-ksszyryjbxx-XM"].length %>)</span>
        <span>被害人库(<%= JSON.parse(JSON.stringify(alldata[0]))["xm-shr-XM"].length %>)</span>
        <span>证人库(<%= JSON.parse(JSON.stringify(alldata[0]))["xm-zr-XM"].length %>)</span>
        <span>住宿记录(<%= JSON.parse(JSON.stringify(alldata[0]))["xm-gnryzsjl-XM"].length %>)</span>
      </div>
    </fieldset>
  </form>
</section>
<section>
  <form >
    <fieldset>
      <legend>关联到的其他维度</legend>
      <div>
        这个维度下的所有所有数据的id:<br/>
        <% if (alldata[0]["es-Entitys"].length) { %>
        <ul >
          <% alldata[0]["es-Entitys"].forEach(function(ese){ %>
          <li class="ids" value="<%= ese["es-id"] %>" style="float: left;margin-right: 5px"><%= ese["es-id"] %></li>
          <% }) %>
          <script>
            $.each($(".ids"),function (i,value) {
              var thvalue=$(value).attr("value");
              $.ajax({ url: "/api/wd_SFZs", data:{filter:{"where":{"es-Entitys.es-id.keyword":thvalue}}}, success: function(data){
                if(data.length>0){
                  $.each(data,function (ii,vv) {
                    $("#maybesfz").append("<li>"+vv.id+"</li>")
                  })

                }
              }});

              $.ajax({ url: "/api/wd_DHHMs", data:{filter:{"where":{"es-Entitys.es-id.keyword":thvalue}}}, success: function(data){
                if(data.length>0){
                  $.each(data,function (ii,vv) {
                    $("#maybedhhm").append("<li>"+vv.id+"</li>")
                  })

                }
              }});
              $.ajax({ url: "/api/wd_JDMCs", data:{filter:{"where":{"es-Entitys.es-id.keyword":thvalue}}}, success: function(data){
                if(data.length>0){
                  $.each(data,function (ii,vv) {
                    $("#maybejd").append("<li>"+vv.id+"</li>")
                  })

                }
              }});


              $.ajax({ url: "/api/wd_AJBHes", data:{filter:{"where":{"es-Entitys.es-id.keyword":thvalue}}}, success: function(data){
                if(data.length>0){
                  $.each(data,function (ii,vv) {
                    $("#maybeajbh").append("<li>"+vv.id+"</li>")
                  })

                }
              }});

            })
          </script>
        </ul>
        <% } %>
      </div>

    </fieldset>
  </form>
</section>

<section>
  <form >
    <fieldset>
      <legend>涉及到的身份证</legend>
      <div>
        <ul  id="maybesfz"></ul>
      </div>
    </fieldset>
  </form>
</section>

<section>
  <form >
    <fieldset>
      <legend>涉及到的电话号码</legend>
      <div>
        <ul  id="maybedhhm"></ul>
      </div>
    </fieldset>
  </form>
</section>

<section>
  <form >
    <fieldset>
      <legend>涉及到的案件编号</legend>
      <div>
        <ul  id="maybeajbh"></ul>
      </div>
    </fieldset>
  </form>
</section>
<section>
  <form >
    <fieldset>
      <legend>涉及到的酒店</legend>
      <div>
        <ul  id="maybejd"></ul>
      </div>
    </fieldset>
  </form>
</section>
